#ifndef APPLICATIONS_POLARISDATA_POLARISDATA_H_
#define APPLICATIONS_POLARISDATA_POLARISDATA_H_

#include "threadunit/ThreadUnit.h"
extern "C" {
    #include "tcpserver.h"
}

#include "SdramData.h"

class PolarisData
{
public:
    PolarisData();
    virtual ~PolarisData();
    static SdramData sdramData;

private:
    struct tcpserver* comm;
    const rt_uint16_t port = 888;
    static rt_uint8_t buf[1024];
    static unsigned long len;
    static unsigned long recvLen;
    static int lastState;

private:
    static void commNotify(tcpclient_t client, rt_uint8_t event);
    static int unpack(const unsigned char *buf,size_t len);
};

#endif /* APPLICATIONS_POLARISDATA_POLARISDATA_H_ */
